# pip freeze > requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
import pkg_resources

txt = """"""
for package in pkg_resources.working_set:
	txt += f"{package.project_name}=={package.version}" + "\n"
	print(f"{package.project_name}=={package.version}")
# print(txt)
with open("requirements.txt", 'w', encoding="utf-8") as f:
	f.write(txt)
